<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>bootstrap</title>
    <link rel="stylesheet" href="css/bootstrap.min.css">
    <style>
      .btn .badge{
        top:-8px;
        color:#fff;
        background: red;
      }
    </style>
</head>
<body>
 <h3>
   这是h3
   <span class="label label-default">New</span>
   <span class="label label-primary">Primary</span>
  <span class="label label-success">Success</span>
  <span class="label label-info">Info</span>
  <span class="label label-warning">Warning</span>
  <span class="label label-danger">Danger</span>
 </h3>


<div style="height: 200px;">
  <button class="btn btn-primary" >
    Messages <span class="badge">4</span>
  </button>
</div>
<script src="js/jquery-3.6.0.min.js"></script>
<script src="js/bootstrap.min.js"></script>
</body>
</html>